// 封装localstorage对token对象的三个操作
// 保存，获取，删除
// 消除魔法字符串
const TOKEW_NAME = 'my-token'
// 保存
export const saveToken = (tokenObj) => {
  localStorage.setItem(TOKEW_NAME, JSON.stringify(tokenObj))
}
// 获取
export const getToken = () => {
  return JSON.parse(localStorage.getItem(TOKEW_NAME))
}
// 删除
export const delToken = () => {
  localStorage.removeItem(TOKEW_NAME)
}
